#include "fuStringVector.h"
#include "BoostForeach.h"

BEGIN_NAMESPACE_CPPX

fuStringVector::fuStringVector( void )
{

}

fuStringVector::~fuStringVector( void )
{
	m_data.clear();
}

fuStringVector& fuStringVector::operator+=( const char* p )
{
	m_data.push_back(p);
	return *this;
}

fuStringVector& fuStringVector::operator,( const char* p )
{
	m_data.push_back(p);
	return *this;
}

fuStringVector& fuStringVector::operator=( fuStringVector const & copy )
{
	m_data.clear();
    foreach(const std::string & str,copy.m_data){
		m_data.push_back(str);
	}
	return *this;
}

int fuStringVector::find( const char * col_name ) const
{
	int order = -1;
    foreach(const std::string & str,m_data){
		order ++;
		if( str == col_name )
			return order;
	}

	return -1;
}

END_NAMESPACE_CPPX
